package com.hp.idempotence.common;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class MyExceptionHandle {
	
	@ExceptionHandler(value = Exception.class)
    @ResponseBody
    public Result handle(Exception e){
        return Result.fail(e.getMessage());
    }

}
